
var mongoose = require('mongoose');

var  userschema = new mongoose.Schema({
    userName:String,
    nickName:String,
    password:String,//密码
    role:{type:String,dafault:1},//角色,0为超管,1为管理员,2为用户
    personalPro:Array,//个人项目的Id
    companyId:Array,
    createTime:{type:Date,dafault:Date.now},
    latTime:{type:Date,dafault:Date.now},
});

// orderSchema.index({id: 1});//索引

mongoose.model('User',userschema);
